{% extends "admin/admin_page.html" %}

{% block content %}
<div class="container-fluid">
	<div class="row-fluid">
    {% if messages %}
    <ul>
    {% for e in messages %}
    <li>{{ e }}</li>
		{% endfor %}
    </ul>
		{% endif %}

    {% if errors %}
    <br>ERRORS: <ul>
    {% for e in errors %}
    <li>{{ e }}</li>
		{% endfor %}
    </ul>
		{% endif %}
		<div class="span10">
			<form action="{{ form_action }}" method="post" enctype="multipart/form-data" accept-charset="utf-8">
				{{ form.as_p }}
				{% if form_action %}
					<p>
						<label>
							{% if pillar.image_url %}
								<img src="{{ pillar.image_thumbnail }}">
								Replace image:
							{% else %}
								Upload image:
							{% endif %}
						</label>
						<input type="file" name="image">
					</p>
				{% endif %}
				<input type="submit" value="Submit" class="btn btn-primary">
			</form>
		</div>
	</div>
</div>
{% endblock %}
